home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / answrbok / 7_10.lha / 7_10 / p_des.c < prev    next >
Text File  |  1993-08-08  |  862b  |  35 lines

  1. * Copyright (c) 1990 by AT&T Bell Telephone Laboratories, Incorporated. */
  2. * The C++ Answer Book */
  3. * Tony Hansen */
  4. * All rights reserved. */
  5. include <process.h>
  6. include <debug.h>    /* DELETE */
  7. rocess::~process()
  8.  
  9.    Rprocessdest();
  10.  
  11.  
  12. oid process::Rprocessdest()
  13.  
  14.    if (debug) /*DELETE*/ cerr << "process" << this << "::~process()\n";
  15.    if (debug) /*DELETE*/ cerr << "\t" << this << "->t_curstate == " << ps_print(t_curstate) << "\n";
  16.    if (mustrecurse())
  17. Rprocessdest();
  18.  
  19.    else
  20. {
  21. if (t_curstate != TASK_TERMINATED)
  22.     error("process not terminated");
  23. if (debug) /*DELETE*/ cerr << "\tt_thisprocess == " << t_thisprocess << "\n";
  24.  
  25. rmfromlist(this, &t_doneprocesses);
  26. if (this == t_thisprocess)
  27.     {
  28.     delete (char*) t_thisprocess;
  29.     t_thisprocess = 0;
  30.     schedule();
  31.     }
  32. if (debug) /*DELETE*/ cerr << "<<<< process" << this << "::~process()\n";
  33. }
  34.  
  35.